package com.test.liuhb.test.entity;

import com.google.gson.annotations.SerializedName;

import java.util.Date;

/**
 * Created by liu.hb on 2018/2/22.
 */

public class User2 {
    //省略其它
    public String name;
    public int age;
    //当上面的三个属性(email_address、email、emailAddress)都中出现任意一个时均可以得到正确的结果。
    //注：当多种情况同时出时，以最后一个出现的值为准。
    @SerializedName(value = "emailAddress", alternate = {"email", "email_address"})
    public String emailAddress;
    public Date date;


    public User2(String name, int age, String emailAddress, Date date) {
        this.name = name;
        this.age = age;
        this.emailAddress = emailAddress;
        this.date = date;
    }

}
